package controller

import (
	"net/http"

	"github.com/gin-gonic/gin"
	"github.com/illidaris/aphrodite/dto"
	"github.com/illidaris/assembly"
)

// AssemblyRoutes gin route
func AssemblyRoutes(e *gin.RouterGroup) {
	base := e.Group("base")
	base.GET("health", VersionHandler)
	base.GET("setting", SettingHandler)

	data := e.Group("data")
	data.GET("all", MsgsHandler)

}

func SettingHandler(c *gin.Context) {
	c.JSON(http.StatusOK, dto.OkResponse(map[string]interface{}{}))
}

func VersionHandler(c *gin.Context) {
	c.JSON(http.StatusOK, dto.OkResponse(assembly.Info()))
}
